package io.zhaocy;

/**
 * Description:
 *
 * @Author: genezhao
 * @Date: 2018-07-05
 */
public class SeqCount {

    private static ThreadLocal<Integer> seqCount = new ThreadLocal(){
        @Override
        public Integer initialValue() {
            return 0;
        }
    };

    public int nextSeq() {
        seqCount.set(seqCount.get() + 1);
        return seqCount.get();
    }

}
